package com.zzyl.nursing.controller.member;

import com.zzyl.common.core.domain.AjaxResult;
import com.zzyl.common.core.domain.R;
import com.zzyl.nursing.dto.UserLoginRequestDto;
import com.zzyl.nursing.service.impl.FamilyMemberServiceImpl;
import com.zzyl.nursing.vo.LoginVo;
import io.swagger.annotations.Api;

import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.zzyl.common.core.controller.BaseController;


/**
 * 老人家属登录小程序Controller
 * 
 * @author guo
 * @date 2024-11-17
 */
@RestController
@RequestMapping("/member/user")
@Api(tags = "老人家属相关接口")
public class FamilyMemberController extends BaseController {
        @Autowired
        private FamilyMemberServiceImpl familyMemberService;

        @RequestMapping("/login")
        @ApiOperation("小程序登录")
        public AjaxResult login(@RequestBody UserLoginRequestDto userLoginRequestDto) {
            LoginVo loginVo = familyMemberService.login(userLoginRequestDto);
            return success(loginVo);
        }
}
